/**
 * 场景1
 * @description:开始界面
 * @author: HuiSir
 * @update: HuiSir(2019-6-17 18:30:37)
 */
(function(window) {
	let Scene1 = window.Scene1 = function() {
		//当前场景
		myGame.curScene = 1
		//按钮坐标
		this.btnX = (myGame.c.width - myGame.button_play.width)/2
		this.btnY = myGame.c.height*0.618
		//记录当前帧数
		this.curFno = myGame.fno
	}
	
	//渲染
	Scene1.prototype.render = function() {
		//渲染背景
		myGame.bg.render()
		//渲染大地
		myGame.land.render()
		//渲染小鸟
		myGame.bird.y = myGame.c.height*0.2 + myGame.bird.birdHeight	//重置小鸟y坐标
		myGame.bird.render()
		//渲染logo
		myGame.ctx.drawImage(myGame.title,(myGame.c.width-myGame.title.width)/2,myGame.c.height*0.1)
		//渲染开始按钮
		if(myGame.fno - this.curFno > 20){	//延时加载按钮
			myGame.ctx.drawImage(myGame.button_play , this.btnX , this.btnY)
		}
	}
})(window)
